<template>
  <!-- 注册页面的整体盒子 -->
  <div class="register-container">
    <!-- 注册的盒子 -->
    <div class="register-box">
      <!-- 标题的盒子 -->
      <div class="title-box"></div>
      <!-- 注册的表单区域 -->
      <el-form>
        <el-form-item>
          <el-input placeholder="请输入用户名" v-model="regForm.username" />
        </el-form-item>
        <el-form-item>
          <el-input
            show-password
            placeholder="请输入密码"
            v-model="regForm.password"
          />
        </el-form-item>
        <el-form-item>
          <el-input
            show-password
            placeholder="请确认密码"
            v-model="regForm.repasswords"
          />
        </el-form-item>
        <el-button type="text">去注册</el-button>
      </el-form>
    </div>
  </div>
</template>

<script>
// 1.完成静态页面及样式
// 2.收集表单数据(v-model)***绑定的变量与请求参数一致
// 3.表单验证
// 4.验证通过发送请求
// 5.跳转到登录页
export default {
  name: 'Register',
  data () {
    return {
      regForm: {
        username: '',
        password: '',
        repasswords: ''
      }
    }
  }
}
</script>

<style lang="less" scoped>
.register-container {
  background: url("~@/assets/images/login_bg.jpg") center;
  background-size: cover;
  height: 100%;

  .register-box {
    width: 400px;
    height: 405px;
    background-color: #fff;
    border-radius: 3px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 0 30px;
    box-sizing: border-box;

    .title-box {
      height: 60px;
      background: url("~@/assets/images/login_title.png") center no-repeat;
    }

    .el-form {
      padding-top: 40px;
      border-top: 1px solid #ccc;
    }
  }
}
</style>
